<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript">
    function count(){
        var a = parseInt(document.getElementById("text1").value);
        var b = parseInt(document.getElementById("text2").value);
        var selectSign = document.getElementById("select").value;

        switch(selectSign){
            case '+': answer = a+b;
            break;
            case '-': answer = a-b;
            break;
            case '*': answer = a*b;
            break;
            case '/': answer = a/b;
        }
        document.getElementById("fruit").value = answer;
    }
    </script>
</head>
<body>
    <input type="text" id="text1" />
    <select id="select">
        <option value="+">+</option>
        <option value="-">-</option>
        <option value="*">*</option>
        <option value="/">/</option>
    </select>
    <input type="text" id="text2" />
    <input type="button" value=" = " onclick="count()" />
    <input type="text" id="fruit" onclick="count()" />
</body>
</html>